<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  function User(name, age) {
    this.name = name;
    this.age = age;
  }
  const user = new User();

  console.dir(User)
  console.dir(user)
  console.dir(User.prototype)

  console.log(user.__proto__ === User.prototype); // true

  console.log(user.__proto__.__proto__ === Object.prototype); // true

  console.log(user.__proto__.__proto__.__proto__ === null); // true

  console.log(User.__proto__ === Function.prototype); // true

  console.log(Function.prototype.__proto__ === Object.prototype); // true

  console.log(Object.__proto__ === Function.prototype); // true

  class A {

  }
  class B extends A {
    
  }
  const b = new B();
  console.log(b instanceof B, b instanceof A) // true true

  const arr = []
  // console.log(arr instanceof {}, b instanceof {})
  console.log(Object.prototype.toString.call(arr), Object.prototype.toString.call(b)) 
  console.log(arr.constructor.name,b.constructor.name) 
</script>

</html>